package com.yunji.app.product;

import com.yunji.common.base.BaseController;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.product.business.ProductBusiness;
import com.yunji.product.domain.ProductDO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Package com.yunji.web.product
 * FileName:	GateWayAdminController.java
 * Copyright:	Copyright © 2024 云集互联 All Rights Reserved
 * Company:		云集互联
 * @version: 1.0
 * @since: JDK 1.8.0_202
 * Create at:   2024-04-10 14:16:33
 * Description:
 * 用户端商品交互
 * Modification History:
 * Author					Date						Version			Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-04-10 14:16:33			1.0				1.0 Version
 */
@Api(tags = "移动端-管理后台接口")
@RestController
@RequestMapping("/gateway/admin")
public class GateWayAdminController extends BaseController {
    @Resource
    ProductBusiness business;

    @ApiOperation("查询代理商可使用商品列表")
    @GetMapping("/productList")
    public Response<List<ProductDO>> list() {
        return ResponseHelper.successWithPage(business.currentSearch());
    }

}